package Controller;

/**
 * Controla os eventos durante a SPLASH.
 * 
 * @author Edjane Catolle, Igor Henrique, Luiz Augusto, Vladmir Chicarolli
 * @version 1.0.0
 * @since 05/31/2011
 */

import View.SplashView;

public class SplashController extends BaseController
{
	private boolean endSplash;
	
	public SplashController() 
	{
		endSplash = false;
		view = new SplashView();
		controller = this;
	}

	@Override
	protected void ControllerHandler() 
	{
		if(!(System.currentTimeMillis() - view.screenTime < view.timeMainMenu) || (endSplash))
		{
			view.ClearBuffer();		
			new MenuController();
		}			
	}
	
	@Override
	public void HandleKeyboard() 
	{
		// 10 = Enter key
		if(GameControlsManager().GetKey() == 10)
		{
			endSplash = true;
		}
	}
}
